package com.dtcnet.skmvp.network.utils;


import com.alibaba.fastjson.JSON;

import okhttp3.MediaType;
import okhttp3.RequestBody;

public class RequestBodyUtil {
    public static RequestBody getBody(Object obj) {
        return getBody(JSON.toJSONString(obj));
    }

    public static RequestBody getBody(String json) {
        return RequestBody.create(MediaType.parse("application/json; charset=utf-8"), json);
    }
}
